<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		body, p,ul {margin: 0; padding: 0;}
		div {width:400px; height:400px; background-color: #45dfff;}
		p {width: 100px; height: 100px; background-color: red; margin: 20px;}
	</style>
</head>
<body>
	<div>
		<p></p>
	</div>
	<span>子元素的上外边距margin-top会一同把父级带动，但是margin-left只作用于自己<br>给父级加overflow可以让父级不动</span>
</body>
</html>